﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using Implement;
using Interface;

namespace Host
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Title = "服务端";

            //using (ServiceHost host = new ServiceHost(typeof(HelldworldService)))
            //{
            //    host.Opened += (sender, e) =>
            //        {
            //            Console.WriteLine("服务已经启动");
            //        };
            //    host.Open();
            //}
            var host = ServiceHostFactory.CreateServiceHost(typeof(HelldworldService));
            host.Open();
            Console.Read();

        }
    }
}
